<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
#alertMsg {
    display: none;
    width: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 1px 1px 10px black;
    padding: 10px;
    font-size: 12px;
    position: absolute;
    text-align: center;
    background: #fff;
    z-index: 100000;
}

#alertMsg_info {
    padding: 2px 15px;
    line-height: 1.6em;
    text-align: left;
}

#alertMsg_btn1, #alertMsg_btn2 {
    display: inline-block;
    background: url(images/gray_btn.png) no-repeat left top;
    padding-left: 3px;
    color: #000000;
    font-size: 12px;
    text-decoration: none;
    margin-right: 10px;
    cursor: pointer;
}

#alertMsg_btn1 cite, #alertMsg_btn2 cite {
    line-height: 24px;
    display: inline-block;
    padding: 0 13px 0 10px;
    background: url(images/gray_btn.png) no-repeat right top;
    font-style: normal;
}

</style>
<title>产品--未来财经旗下p2p网贷门户</title>
<meta name="keywords" content="网贷,P2P网贷,P2P理财,未来网贷">
<meta name="description" content="未来网贷未来财经旗下的P2P网贷理财行业门户网站，提供全方位、权威的网贷平台数据，是您身边的网贷资讯和P2P理财方面的专家,为您的网贷之路保驾护航">
<jsp:include page="/include/header.jsp"/>
<link rel="stylesheet" href="${basePath }/css/product.css"/>
<link rel="stylesheet" href="${basePath }/css/product_right.css"/>
<link rel="stylesheet" href="${basePath }/css/circlejindu.css"/>
<link rel="stylesheet" href="${basePath }/css/public.css"/>
<link rel="stylesheet" href="${basePath }/css/product_list.css"/>
<link rel="stylesheet" href="${basePath }/css/index_rightfloat.css"/>
<script type="text/javascript" src="${basePath }/js/jquery.cookies.2.2.0.js"></script>
<script src="${basePath }/js/index_rightfloat.js"></script>
</head>
<body>
<!--头部开始-->
<jsp:include page="/include/top.jsp"/>
<!--banner广告-->
<div class="ad">
<c:forEach items="${guanggaowei}" var="guanggaowei">
<c:if test="${guanggaowei.content_id == 2467 }">
	<a href="${guanggaowei.link}"><img src="${imgHost }${guanggaowei.title_img}" ></a>
</c:if>
</c:forEach>
</div>
<!--头部结束-->

<!--正文begin-->
<div id="section">
    <div class="frame">
        <div class="frame-left">
            <div id="smart-bar">
                <div class="path-info">
                    <a>首页</a> > <a>产品</a> > <a class="current-page">列表</a>
                </div>
                <div class="selector-list">
                    <ul class="selector-set" id="set">
                    </ul>
                </div>

                <div class="mini-search" style="display: none">
                    <form action="${basePath }/productList/platNamesearch">
                        <input type="text" name="word" autocomplete="off" id="mini-search-input" placeholder="请输入平台简拼或关键字"/>
                        <ul id="minisearch-list"></ul>
                    </form>
                </div>
            </div>

            <div class="select-condition">
                <div class="select-condition-list">
                    <font>热门标签:</font>
                    <ul class="select-list btn" id="hot-tag">
                        <li><a href="javascript:;" value="1" >稳健性</a></li>
                        <li><a href="javascript:;" value="2">高收益</a></li>
                        <li><a href="javascript:;" value="3">低风险</a></li>
                    </ul>
                    <div class="clear"></div>
                </div>

                <div class="select-condition-list">
                    <font>安全评级:</font>
                    <ul class="select-list" id="grade">
                        <li><a href="javascript:;" class="box-checked">不限</a></li>
                        <li><label for="grade1"><input type="checkbox" name="grade" id="grade1" value="1"/>AAA</label></li>
                        <li><label for="grade2"><input type="checkbox" name="grade" id="grade2" value="2"/>AA</label></li>
                        <li><label for="grade3"><input type="checkbox" name="grade" id="grade3" value="3"/>A</label></li>
                        <li><label for="grade4"><input type="checkbox" name="grade" id="grade4" value="4"/>BBB</label></li>
                        <li><label for="grade5"><input type="checkbox" name="grade" id="grade5" value="5"/>BB</label></li>
                        <li><label for="grade6"><input type="checkbox" name="grade" id="grade6" value="6"/>B</label></li>
                    </ul>
                    <div class="clear"></div>
                </div>

                <div class="select-condition-list">
                    <font>年化收益:</font>
                    <ul class="select-list" id="income">
                        <li><a href="javascript:;" class="box-checked">不限</a></li>
                        <li><label for="incame1"><input type="checkbox" name="incame" id="incame1" value="1"/>8%以下</label></li>
                        <li><label for="incame2"><input type="checkbox" name="grade" id="incame2" value="2"/>8-12%</label></li>
                        <li><label for="incame3"><input type="checkbox" name="incame" id="incame3" value="3"/>12-14%</label></li>
                        <li><label for="incame4"><input type="checkbox" name="incame" id="incame4" value="4"/>14-16%</label></li>
                        <li><label for="incame5"><input type="checkbox" name="incame" id="incame5" value="5"/>16%以上</label></li>
                    </ul>
                    <div class="clear"></div>
                </div>

                <div class="select-condition-list">
                    <font>投资期限:</font>
                    <ul class="select-list" id="dateline">
                        <li><a href="javascript:;" class="box-checked">不限</a></li>
                        <li><label for="dateline1"><input type="checkbox" name="dateline" id="dateline1" value="1"/>1月以下</label></li>
                        <li><label for="dateline2"><input type="checkbox" name="dateline" id="dateline2" value="2"/>1-3个月</label></li>
                        <li><label for="dateline3"><input type="checkbox" name="dateline" id="dateline3" value="3"/>3-6个月</label></li>
                        <li><label for="dateline4"><input type="checkbox" name="dateline" id="dateline4" value="4"/>6-12个月</label></li>
                        <li><label for="dateline5" class="select-label-big"><input type="checkbox" name="dateline" id="dateline5" value="5"/>12个月以上</label></li>
                    </ul>
                    <div class="clear"></div>
                </div>

                <div class="select-condition-list">
                    <font>所属平台:</font>
                    <ul class="select-list">
                        <li><a href="javascript:;" class="box-checked">不限</a></li>
                    </ul>
                    <ul class="select-list limit-section" id="platform">
                        <li><label for="platform1"><input type="checkbox" name="platform" id="platform1" value=""/>陆金所</label></li>
                        <li><label for="platform2"><input type="checkbox" name="platform" id="platform2" value=""/>众信在线</label></li>
                        <li><label for="platform3"><input type="checkbox" name="platform" id="platform3" value=""/>陆金所</label></li>
                        <li><label for="platform4"><input type="checkbox" name="platform" id="platform4" value=""/>众信在线</label></li>
                        <li><label for="platform5"><input type="checkbox" name="platform" id="platform5" value=""/>陆金所</label></li>
                        <li><label for="platform6"><input type="checkbox" name="platform" id="platform6" value=""/>众信在线</label></li>

                        <li><label for="platform7"><input type="checkbox" name="platform" id="platform7" value=""/>陆金所</label></li>
                        <li><label for="platform8"><input type="checkbox" name="platform" id="platform8" value=""/>众信在线</label></li>
                        <li><label for="platform9"><input type="checkbox" name="platform" id="platform9" value=""/>陆金所</label></li>
                        <li><label for="platform10"><input type="checkbox" name="platform" id="platform10" value=""/>众信在线</label></li>
                        <li><label for="platform11"><input type="checkbox" name="platform" id="platform11" value=""/>陆金所</label></li>
                        <li><label for="platform12"><input type="checkbox" name="platform" id="platform12" value=""/>众信在线</label></li>

                        <li><label for="platform13"><input type="checkbox" name="platform" id="platform13" value=""/>陆金所</label></li>
                        <li><label for="platform14"><input type="checkbox" name="platform" id="platform14" value=""/>众信在线</label></li>
                        <li><label for="platform15"><input type="checkbox" name="platform" id="platform15" value=""/>陆金所</label></li>
                        <li><label for="platform16"><input type="checkbox" name="platform" id="platform16" value=""/>众信在线</label></li>
                        <li><label for="platform17"><input type="checkbox" name="platform" id="platform17" value=""/>陆金所</label></li>
                        <li><label for="platform18"><input type="checkbox" name="platform" id="platform18" value=""/>众信在线</label></li>
                    </ul>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="production-list">
                <div id="smart-bar-title">
                <div class="pro-top">
                    <span id="size">为您找到 ${size }个网贷产品</span>
                    <div class="drop-input drop-down"><span>默认排序</span>
                    <div class="order-selector">
                        <a href="javascript:;" value="create_time">默认排序</a>
                        <a href="javascript:;" value="level">安全评级</a>
                        <a href="javascript:;" value="year_rate">年化收益</a>
                        <a href="javascript:;" value="borrow_date">投资期限</a>
                        <a href="javascript:;" value="borrow_progress">投资进度</a>
                    </div>
                    </div>
                </div>
                <dl class="data-list">
                    <dt>
                        <span class="col-pt">平台</span>
                        <span >产品</span>
                        <span>安全评级</span>
                        <span>年化收益</span>
                        <span>投资期限</span>
                        <span>投资进度</span>
                        <span class="col-big">操作</span>
                    </dt>
                </dl>
                </div>
                <dl class="data-list" id="data-list">
                    <jsp:include page="list2.jsp"/>
                </dl>
                <div class="more-info">
                    <a href="javascript:;" onclick="pageMore();">加载更多</a>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="frame-right">
            <div class="nav-title-max">
                <a>大家都购买了</a>
            </div>
            <div class="scroll-history">
                <div class="scroll-list">
                      <c:forEach items="${productsMessage }" var="f"  varStatus="status">
                    <div class="item">
                        <img class="avatar" src="/images/huiyuan_tx.png" />
                        <div class="item-info">
                            <p class="list-name">${f.title }</p>
                            <p class="list-info">${f.p_user_id }购买了该产品</p>
                        </div>
                    </div>
                </c:forEach>

                </div>
            </div>

            <div class="product-ad">
                <c:forEach items="${guanggaowei}" var="guanggaowei">
				<c:if test="${guanggaowei.content_id == 2472 }">
					<a href="${guanggaowei.link}"><img src="${imgHost }${guanggaowei.title_img}" width="300"></a>
				</c:if>
			</c:forEach>
            </div>
            <div class="product-ad">
               <c:forEach items="${guanggaowei}" var="guanggaowei">
				<c:if test="${guanggaowei.content_id == 2476 }">
					<a href="${guanggaowei.link}"><img src="${imgHost }${guanggaowei.title_img}" width="300"></a>
				</c:if>
			</c:forEach>
            </div>
        </div>
    </div>
   <div class=" clear"></div>
</div>
<!--尾部开始-->
<jsp:include page="/include/footer.jsp"/>
<!-- 右侧浮动代码结束 -->

<!--弹出跳转框开始-->
<div id="platform-jump">
    <h1>登陆未来网贷账号<a class="close" href="javascript:;">×</a></h1>
    <div class="info">
        <p>一站式的金融服务</p>
        <p>最有价值的金融平台！</p>
    </div>
    <div class="btn">
        <a href="javascript:;" class="l" id="login_url">立即登陆</a><a href="javascript:;" class="r" id="product_url" target="_blank">直接去平台</a>
    </div>
</div>
<!--弹出跳转框结束-->
<script src="${basePath }/js/minisearch.js"></script>
<script>
    var tpl = '<li id="_id_replace_"><span class="selector-info">_txt_replace_</span><span class="close-x"></span></li>';

    function multi_select(item){
        var container = $(item).closest(".select-condition-list");
        if(container.length){
            var node,text;
            if($(item).closest("li").find("input[type=checkbox]").length){/*勾选*/
                node = $(item).closest("li").find("label");
                var fid = $(item).closest(".select-list").attr('id');
                var index = $(item).closest(".select-list").find("label").index(node);
                var newid = fid +"_"+index;
               // console.log(node);
                if(!node.hasClass('box-checked')){
                    var txt = node.text();
                    node.find("input[type=checkbox]").attr("checked","checked");
                    if(!$("#"+newid).length){
                        var nodeinfo =  tpl.replace("_id_replace_",newid).replace("_txt_replace_",txt);
                        $(".selector-set").append(nodeinfo);
                    }
                    $(container).find("a.box-checked").removeClass('box-checked');
                }else{
                    if($("#"+newid).length){
                        $("#"+newid).remove();
                    }
                }
            }else{/*点击不限*/
                node = $(item).closest("li").find("a");
                if(!node.hasClass('box-checked')){
                    $(container).find(".box-checked").find("input[type=checkbox]").removeAttr("checked");
                    $(container).find(".box-checked").removeClass('box-checked');
                   $(container).find(".select-list").each(function(){
                       if(typeof($(this).attr('id'))!="undefined"){
                            var fid = $(this).attr('id');
                            $(".selector-set li[id^='"+fid+"']").remove();
                        }
                    });
                }
            }
            if(node.hasClass('box-checked')){
                node.removeClass("box-checked");
            }else{
                node.addClass('box-checked');
            }
        }
    }
    /*绑定多选事件*/
    $(".select-condition-list a").click(function(){
        if(!$(this).closest('.select-list').hasClass('btn')){// 不限
            multi_select(this);
            search();
            return false;
        }else{//热门标签
            if($(this).hasClass('cur')){
                $(this).removeClass('cur')
                $("#income").find("label").removeClass("box-checked");
                $("#set").html("");
            }else{
            	$(this).parent().parent().find('a').removeClass('cur');
            	$("#income").find("label").removeClass("box-checked");
            	$("#set").html("");
    			$(this).addClass("cur");
    			var val = $(this).attr("value");
    			if(val==1){//3,4
    				var in3 = $("#income").find("input[value=3]");
    				var in4 = $("#income").find("input[value=4]");
    				multi_select(in3.parent());
    				multi_select(in4.parent());
    			}else if(val==2){//5
    				var in5 = $("#income").find("input[value=5]");
    				multi_select(in5.parent());
    			}else{// 1,2
    				var in1 = $("#income").find("input[value=1]");
    				var in2 = $("#income").find("input[value=2]");
    				multi_select(in1.parent());
    				multi_select(in2.parent());
    			}
            }
            search();
        }
    })
    $(".select-condition-list label").click(function(){
        multi_select(this);
        return false;
    })
    /*取消选择*/
    $(".selector-set").on("click","li",function(){
            var idstr = $(this).attr('id');
            if(idstr){
                var fid = idstr.split("_")[0];
                var index = idstr.split("_")[1];
                var node = $("#"+fid+" label").eq(index);
                if(node.length){
                    node.find("input[type=checkbox]").removeAttr("checked");
                    node.removeClass("box-checked");
                    $(this).remove();
                    var pos_type = $("#smart-bar").css('position');
                    if(pos_type !='static'){
                        console.log(pos_type)
                        var list_top = $(".production-list").offset().top;
                        var height = $("#smart-bar").height();
                        $("body").animate({"scrollTop":list_top - height});
                    }
                }
            }
            search();
    })

    /*下拉框*/
    $(".drop-input").click(function(){
        if($(".order-selector").is(":hidden")){
            $(this).removeClass('drop-down').addClass('drop-up');
            $(".order-selector").show();
        }else{
            $(this).removeClass('drop-up').addClass('drop-down');
            $(".order-selector").hide();
        }
        return false;
    })
    $(".order-selector a").click(function(){
    	var sp = "<span text='"+$(this).attr("value")+"'>"+$(this).text()+"</span>";
        $(".drop-input span").html(sp);
        search();
    })

    /*抢标弹出框*/
   /*  $(".data-list").on("click",".btn-q",function(){
        var top = ($(window).height() -  $("#platform-jump").height())/2;
        var left = ($(window).width() -  $("#platform-jump").width())/2;
        var scrollTop = $(document).scrollTop();
        var scrollLeft = $(document).scrollLeft();
        $("#login_url").attr("href","http://www.weilaiwd.com/login.jspx?returnUrl="+window.location.href);
        $("#product_url").attr("href",$(this).attr("url"));
        $("#platform-jump").show().offset({"left":left+scrollLeft,"top":top+scrollTop});
        return false;
    }) */
  
    $("#platform-jump a").click(function(){
        $("#platform-jump").hide();
    })

    /*投标记录走马灯*/
    var list_length = $(".scroll-list").height();/*列表长度*/
    var item_length = $(".scroll-list .item").first().height();/*单条长度*/
    $(".scroll-list").append($(".scroll-list").html())
    var his_int;
    function history_scroll(){
        if($(".scroll-list").is(":animated")) return;
        var pos = parseInt($(".scroll-list").css("margin-top"));
        var newpos = pos - item_length;
        //console.log(pos,newpos,item_length)
        if(newpos + list_length + item_length <= 0){
           $(".scroll-list").css({"margin-top":0});
        }else{
            $(".scroll-list").animate({"margin-top":newpos},1000);
        }
    }
   his_int = setInterval('history_scroll()',2000);
    $(".scroll-history").mouseover(function(){
        clearInterval(his_int);
    })
    $(".scroll-history").mouseout(function(){
        his_int = setInterval('history_scroll()',2000);
    })

    var follow = function(){};
    follow.prototype = {
        init : function(id){
            this.obj = $("#"+id);
            this.org_top = this.obj.offset().top;
            this.org_lef = this.obj.offset().left;
            this.org_height = this.obj.height();
            this.has_move = 0;
            this.offset = 0;
            this.offsetdom = ''
            this.interval = null;
            this.scrolltop = $(window).scrollTop();
        },

        _move :function(that){
        	if(that.offsetdom){
                that.offset = $("#"+this.offsetdom).outerHeight(true);
            }
            var scrolltop = $(window).scrollTop();
            var onmove = that.obj.is(":animated");
            if(scrolltop - that.org_top> that.org_height && (!that.has_move) && !onmove){
                this.obj.css({"position":"absolute","left":that.org_lef,"top":scrolltop+that.offset,"padding-top":5})
            }
            if(scrolltop - that.org_top <=0){
                that.obj.css({"position":"static","padding-top":0});
                that.has_move = 0;
            }
        },

        start : function(){
            var that = this;
            $(window).scroll(function(){
                that.scrolltop = $(window).scrollTop();
                if(that.scrolltop - that.org_top <=0){
                    that.obj.css({"position":"static","padding-top":0});
                    return;
                }
                that._move(that);
            })
        }

    };

    var follow_smart_bar = new follow();
    follow_smart_bar.init('smart-bar');
    follow_smart_bar.start();
    var title_smart_bar = new follow();
    title_smart_bar.init('smart-bar-title');
    title_smart_bar.offsetdom = "smart-bar";
    title_smart_bar.offset = $("#smart-bar").height();
    title_smart_bar.start();

    var minisearch = new Minisearch();
    minisearch.init({id:'mini-search-input',url:"${basePath}/js/pt_data.json"})
    /*浮动*/
</script>

<script type="text/javascript">
	function pageMore() {//加载更多
		var pageNo = Number($(".pageNumber").last().val())+1;
		var rows = $("#data-list").find("dd");
		var paramJson = getCondition();
		paramJson.pageNo = pageNo;
		$.ajax({
			url:"${basePath}/productList/search",
			type:"post",
			data:paramJson,
			dataType:"html"
		}).done(function(data){
			rows.last().after(data);
			initMore();
		})
	}
	
	function getCondition() {
		//热门
		var remen = new Array();
		$('#hot-tag li').each(function (){
			if($(this).find('a').hasClass('cur')){
				remen.push($(this).find('a').attr("value"));
			}
		});
		// 安全
		var anquan = new Array();
		$("#grade li").each(function (){
			if($(this).find('label').hasClass('box-checked')){
				anquan.push( $(this).find('input').attr('value'));
			}
		});
		var nianhua = new Array();
		$("#income li").each(function (){
			if($(this).find('label').hasClass('box-checked')){
				nianhua.push( $(this).find('input').attr('value'));
			}
		});
		var touzi = new Array();
		$("#dateline li").each(function (){
			if($(this).find('label').hasClass('box-checked')){
				touzi.push( $(this).find('input').attr('value'));
			}
		});
		var plat = new Array();
		$("#platform li").each(function (){
			if($(this).find('label').hasClass('box-checked')){
				plat.push( $(this).find('input').attr('value'));
			}
		});
		
		var paramJson={};
		paramJson.remen = remen;
		paramJson.anquan = anquan;
		paramJson.nianhua = nianhua;
		paramJson.touzi = touzi;
		paramJson.plat = plat;
		paramJson.paixu = $(".drop-input span").find("span").attr("text");
		return paramJson;
	}
	
	function initMore() {
		$(".production-list").find(".more-info").show();
		$(".production-list").find(".more-info").next().show();
		var pageNumber = $(".pageNumber").last().val();
		var totalPage = $(".totalPage").last().val();
		if(pageNumber==totalPage) {
			$(".production-list").find(".more-info").hide();
			$(".production-list").find(".more-info").next().hide();
		}	
	}
	// 产品页面查询过来的
	var remen = "${remen}";
	var touzi = "${touzi}";
	if(remen!=''){
		if(remen==1){
			var tag = $("#hot-tag").find("a[value=1]");
			tag.parent().parent().find('a').removeClass('cur');
        	$("#income").find("label").removeClass("box-checked");
        	$("#set").html("");
        	tag.addClass("cur");
				var in3 = $("#income").find("input[value=3]");
				var in4 = $("#income").find("input[value=4]");
				multi_select(in3.parent());
				multi_select(in4.parent());
		}else if(remen==2){
			var tag = $("#hot-tag").find("a[value=2]");
			tag.parent().parent().find('a').removeClass('cur');
        	$("#income").find("label").removeClass("box-checked");
        	$("#set").html("");
        	tag.addClass("cur");
        	var in5 = $("#income").find("input[value=5]");
			multi_select(in5.parent());
		}else{
			var tag = $("#hot-tag").find("a[value=3]");
			tag.parent().parent().find('a').removeClass('cur');
        	$("#income").find("label").removeClass("box-checked");
        	$("#set").html("");
        	tag.addClass("cur");
        	var in1 = $("#income").find("input[value=1]");
			var in2 = $("#income").find("input[value=2]");
			multi_select(in1.parent());
			multi_select(in2.parent());
		}
	}
	if(touzi!=''){
		if(touzi==1){
			var line = $("#dateline").find("input[value=1]");
			multi_select(line.parent());
		}else if(touzi==2){
			var line = $("#dateline").find("input[value=2]");
			multi_select(line.parent());
		}else if(touzi==3){
			var line = $("#dateline").find("input[value=3]");
			multi_select(line.parent());
		}else if(touzi==4){
			var line = $("#dateline").find("input[value=4]");
			multi_select(line.parent());
		}else{
			var line = $("#dateline").find("input[value=5]");
			multi_select(line.parent());
		}
	}
	initMore();
</script>

<script>

function test(platid,product_link){
	var flag = '${sessionScope.login_user_id eq null }';
	var result = false;
	if(flag=='true'){
		var top = ($(window).height() -  $("#platform-jump").height())/2;
	    var left = ($(window).width() -  $("#platform-jump").width())/2;
	    var scrollTop = $(document).scrollTop();
	    var scrollLeft = $(document).scrollLeft();
	    $("#login_url").attr("href","http://www.weilaiwd.com/login.jspx?returnUrl="+window.location.href);
	    $("#product_url").attr("href",$(this).attr("url"));
	    $("#platform-jump").show().offset({"left":left+scrollLeft,"top":top+scrollTop});
	}else{
		result = true;
	}
	if(result){
		var jr_auth= $.cookie("jr_auth"); 
		jr_auth = eval("("+jr_auth+")");
		$.ajax({
			   async:false,
			   url: 'http://api.weilaiwd.com:8084/binding/jump',
			   type: "GET",
			   dataType: 'jsonp',
			   jsonp: 'callback',
			   data: "user_id="+jr_auth.uid+"&platid="+platid+"&url="+product_link,
			   timeout: 5000,
			   beforeSend: function(){
			   //jsonp 方式此方法不被触发.原因可能是dataType如果指定为jsonp的话,就已经不是ajax事件了
			   },
			   success: function (json) {//客户端jquery预先定义好的callback函数,成功获取跨域服务器上的json数据后,会动态执行这个callback函数
				   if(json.code=="0")
				   alertMsg("<a href='"+json.url+"'>一键登陆</a>");
			   if(json.code=="2")
				   alertMsg("<a href='"+json.loginurl+"'>创建</a>&nbsp;&nbsp;&nbsp;<a href='"+json.bindurl+"'>绑定</a>");
			   if(json.code=="3")
				   alertMsg("<a href='http://www.weilaiwd.com/member/index.jspx'>请绑定手机或邮箱</a>");
			   },
			   error: function(xhr){
			    alert("请求出错(请检查相关度网络状况.)");
			   }
			});
	}
	
}

</script>
<script type="text/javascript">
function alertMsg(msg, mode) { //mode为空，即只有一个确认按钮，mode为1时有确认和取消两个按钮
	msg = msg || '';
	mode = mode || 0;
	var top = document.body.scrollTop || document.documentElement.scrollTop;
	var isIe = (document.all) ? true : false;
	var isIE6 = isIe && !window.XMLHttpRequest;
	var sTop = document.documentElement.scrollTop || document.body.scrollTop;
	var sLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
	var winSize = function(){
	    var xScroll, yScroll, windowWidth, windowHeight, pageWidth, pageHeight;
	    // innerHeight获取的是可视窗口的高度，IE不支持此属性
	    if (window.innerHeight && window.scrollMaxY) {
	        xScroll = document.body.scrollWidth;
	        yScroll = window.innerHeight + window.scrollMaxY;
	    } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
	        xScroll = document.body.scrollWidth;
	        yScroll = document.body.scrollHeight;
	    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	        xScroll = document.body.offsetWidth;
	        yScroll = document.body.offsetHeight;
	    }

	    if (self.innerHeight) {    // all except Explorer
	        windowWidth = self.innerWidth;
	        windowHeight = self.innerHeight;
	    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	        windowWidth = document.documentElement.clientWidth;
	        windowHeight = document.documentElement.clientHeight;
	    } else if (document.body) { // other Explorers
	        windowWidth = document.body.clientWidth;
	        windowHeight = document.body.clientHeight;
	    }

	    // for small pages with total height less then height of the viewport
	    if (yScroll < windowHeight) {
	        pageHeight = windowHeight;
	    } else {
	        pageHeight = yScroll;
	    }

	    // for small pages with total width less then width of the viewport
	    if (xScroll < windowWidth) {
	        pageWidth = windowWidth;
	    } else {
	        pageWidth = xScroll;
	    }

	    return{
	        'pageWidth':pageWidth,
	        'pageHeight':pageHeight,
	        'windowWidth':windowWidth,
	        'windowHeight':windowHeight
	    }
	}();
	//alert(winSize.pageWidth);
	//遮罩层
	var styleStr = 'top:0;left:0;position:absolute;z-index:10000;background:#666;width:' + winSize.pageWidth + 'px;height:' +  (winSize.pageHeight + 30) + 'px;';
	styleStr += (isIe) ? "filter:alpha(opacity=80);" : "opacity:0.8;"; //遮罩层DIV
	var shadowDiv = document.createElement('div'); //添加阴影DIV
	shadowDiv.style.cssText = styleStr; //添加样式
	shadowDiv.id = "shadowDiv";
	//如果是IE6则创建IFRAME遮罩SELECT
	if (isIE6) {
	    var maskIframe = document.createElement('iframe');
	    maskIframe.style.cssText = 'width:' + winSize.pageWidth + 'px;height:' + (winSize.pageHeight + 30) + 'px;position:absolute;visibility:inherit;z-index:-1;filter:alpha(opacity=0);';
	    maskIframe.frameborder = 0;
	    maskIframe.src = "about:blank";
	    shadowDiv.appendChild(maskIframe);
	}
	document.body.insertBefore(shadowDiv, document.body.firstChild); //遮罩层加入文档
	//弹出框
	var styleStr1 = 'display:block;position:fixed;_position:absolute;left:' + (winSize.windowWidth / 2 - 200) + 'px;top:' + (winSize.windowHeight / 2 - 150) + 'px;_top:' + (winSize.windowHeight / 2 + top - 150)+ 'px;'; //弹出框的位置
	var alertBox = document.createElement('div');
	alertBox.id = 'alertMsg';
	alertBox.style.cssText = styleStr1;
	//创建弹出框里面的内容P标签
	var alertMsg_info = document.createElement('P');
	alertMsg_info.id = 'alertMsg_info';
	alertMsg_info.innerHTML = msg;
	alertBox.appendChild(alertMsg_info);
	//创建按钮
	var btn1 = document.createElement('a');
	btn1.id = 'alertMsg_btn1';
	btn1.href = 'javas' + 'cript:void(0)';
	btn1.innerHTML = '<cite>确定</cite>';
	btn1.onclick = function () {
	    document.body.removeChild(alertBox);
	    document.body.removeChild(shadowDiv);
	    return true;
	};
	alertBox.appendChild(btn1);
	if (mode === 1) {
	    var btn2 = document.createElement('a');
	    btn2.id = 'alertMsg_btn2';
	    btn2.href = 'javas' + 'cript:void(0)';
	    btn2.innerHTML = '<cite>取消</cite>';
	    btn2.onclick = function () {
	        document.body.removeChild(alertBox);
	        document.body.removeChild(shadowDiv);
	        return false;
	    };
	    alertBox.appendChild(btn2);
	}
	document.body.appendChild(alertBox);

	}
	
	/* $("#hot-tag").find("a").click(function(){
		if($(this).attr("class")=='cur'){
			alert($(this).attr("class"));
			$(this).removeClass("cur");
		}else{
			alert(1);
			$(this).parent().parent().find('a').removeClass('cur');
			$(this).addClass("cur");
		}
		
		search();
	}); */
	$("#grade").find("label").click(function(){
		search();
	});
	$("#income").find("label").click(function(){
		search();
	});
	$("#dateline").find("label").click(function(){
		search();
	});
	$("#platform").find("label").click(function(){
		search();
	});
	function search(){
		var len = $("#set").text().trim().length;
		if(len==0){//不限
			$("#hot-tag").find("a").removeClass("cur");
			$(".select-condition-list a").addClass("box-checked");
		}
		var paramJson = getCondition();
		paramJson.pageNo = 1;
		$.ajax({
			url: "${basePath}/productList/search",
			type: "post",
			data:paramJson,
			dataType:'html',
			success: function(data){
				$("#data-list").html("").html(data);
				initMore();
				}
	  }); 		
	}
	
</script>
</body>


</html>